<div id="main" align='center'>
    <br />
    <?php if(isset($message)) echo "<center><font color=green><b>$message</b></font><center><br />"; ?>
    <form name='subjects' id='subjects' action='<?php echo Utility::getSiteUrl(); ?>/makeexam/index' method='post'>
    <table>
       <tr>
          <td>
             Mã lớp <input type='text' name='id' id='id' maxlength='6' size='6' />
          </td>
          <td>
             &nbsp;&nbsp;&nbsp;
             Môn học <input type='text' name='subject' id='subject' maxlength='50' size='30' />
          </td>
          <td>
             &nbsp;&nbsp;&nbsp;
             Giảng viên <input type='text' name='lecture' id='lecture' maxlength='30' size='20' />
          </td>
          <td>
             &nbsp;&nbsp;
             <input type='submit' name='search' id='search' value='Tìm kiếm' class='art-button' />
          </td>
       </tr>
    </table>
    <br />
    <table valign="MIDDLE" border='1' bordercolor='#ACACAC' width='600'>
        <thead>
            <tr>
                <th width='45'>Mã lớp</th>
                <th width='45'>Mã môn</th>
                <th width='170'>Tên môn</th>
                <th width='110'>Giảng viên</th>
                <th width='40'>Học kì</th>
                <th width='160'>Thời gian thi</th>
                <th>Xem đề(.doc)</th>
            </tr>
        </thead>       
        <tbody>
            <?php
            foreach($classes as $class)
            {
                ?>
                <tr>
                    <td><center><b><a href="<?php echo Utility::getSiteUrl(); ?>/makeexam/index/<?php echo $class->id; ?>"><?php echo $class->id; ?></a></b></center></td>
                    <td><?php echo $class->subjectid; ?></td>
                    <td><?php echo $class->subject; ?></td>
                    <td><?php echo $class->lecture; ?></td>
                    <td><?php echo $class->semester; ?></td>
                    <td><?php echo $class->time; echo ($class->isreal==1)?'(Thi thật)':'(Thi thử)'; ?></td>
                    <td style="text-align: center;"><a href="<?php echo Utility::getSiteUrl(); ?>/makeexam/export/<?php echo
                     $class->subjectid; ?>/<?php echo $class->subject; ?>">xem</a></td>
                </tr>
                <?php
            }
            ?>
        </tbody>
    </table>
    </form>
</div>
